<html>
<!-- $LastChangedDate: 2009-11-07 22:56:33 -0500 (Sat, 07 Nov 2009) $ -->
<!-- Copyright (C) 2004,2009 Jim Brooks http://www.palomino3d.org -->
<head>
<title>Palomino - Crash Determination</title>
<link rel='stylesheet' type='text/css' href='docs.css'>
<link rel='icon' type='image/png' href='images/favicon.png'/>
</head>
<body>

<!-- ----------------------------------------------------------------------- -->
<h1>Palomino - Crash Determination</h1>
<p>
&copy;2004,2009&nbsp;&nbsp;Jim E. Brooks
&nbsp;&nbsp;<a href='http://www.palomino3d.org'>http://www.palomino3d.org</a>
</p>
<hr>
<ul>
  <li><a href='index.html'>Index</a></li>
  <li><a href='#Crash Determination'>Crash Determination</a></li>
</ul>

<!-- ----------------------------------------------------------------------- -->
<hr>
<a name='Crash Determination'></a>
<h2>Crash Determination</h2>
<p><!--date-->[2008/03]</p>
<h3>Overview</h3>
<p>
Crash determination isn't part of the <a href='module_collision.html'>collision module</a>.
</p>
<p>
A crash (fatal collision) is determined by both collision-detection and the physics model.
<i>collision-detection</i> means nothing more than
the intersection of graphical objects.
So an aircraft could be in <i>collision</i> with a runway,
but of course it hasn't necessarily <i>crashed</i>.
</p>
<h3>Implementation</h3>
<p>
Both collision-detection and crash-determination are
executed every timer-tick [Craft::Tick()].
Craft::Tick() calls the physics model [CraftPhysics::MoveObject()].
</p>
<p>
The physics model has to handle a Craft colliding into another Object.
Along the way, it has to also do crash-determination.
For example, if a Craft is in collision with a runway,
downward velocity must be changed to zero
(to counteract the force of gravity or the Craft would move down thru the runway).
But downward velocity is also needed to determine if a crash occurred.
It is what distinguishes between sitting on, or crash-diving into, the runway.
</p>
<p>
Currently, crash-determination is split across the physics model (CraftPhysics)
and the Aircraft class.  There are some causes of a crash that physics model
doesn't have enough info needed for determination (such as names of Objects),
so some determination is deferred to the higher-level (Aircraft is in the app-level).
</p>

<!-- ********************************* END ********************************* -->
<hr>
<p align='center'>
<font size='-2'>
<!-- hhmts start -->
Last modified: Sat Nov  7 14:41:11 CST 2009
<!-- hhmts end -->
</font>
</p>

</body>
</html>
